package com.topchain.licence;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
public class LicenceContent implements Serializable {

    private static final long serialVersionUID = -8041217768789327505L;

    @ApiModelProperty("用户(licence的使用者)")
    private String user;

    @ApiModelProperty("Licence生效时间")
    private long notBeforeTime;

    @ApiModelProperty("Licence失效时间")
    private long notAfterTime;

    @ApiModelProperty("使用者服务器的IP地址")
    private String allowIp;

    @ApiModelProperty("使用者服务器的MAC地址")
    String mac;

    @ApiModelProperty(value = "Licence签名信息", hidden = true)
    private String sign;

    // 根证书内容
    private String rootCertContent;
    // 用户证书内容
    private String userCertContent;


    
    ///////////////// 生成用户证书所需信息 (不需要前端传递了)/////////////////
    @ApiModelProperty(value = "用户证书标识名")
    private String certName;

    @ApiModelProperty(value = "用户证书证书DN", example = "CN=User,C=CN,ST=Guangdong,L=Shenzhen,O=R&D Center,OU=IT")
    private String dn;

    @ApiModelProperty(value = "用户证书有效期(单位:年)", example = "20")
    private int validDate;

    @ApiModelProperty(value = "根证书标识名", hidden = true)
    private String rootCertName;
    
}
